mtmock = {}
mtmock.settings = {}
dofile('mtmock.conf')

-- bind minetest and core aliases and
-- work with minetest alias from here on
minetest = mtmock
core = mtmock

function core.get_builtin_path()
    return core.SCRIPTDIR
end

-- load MT's serialize functions
dofile(core.get_builtin_path() .. 'common/serialize.lua')

minetest.connected_players = {}
minetest.worldpath = mtmock.WORLDDIR

function minetest.get_worldpath()
    return minetest.worldpath
end

function minetest.get_connected_players()
    return minetest.connected_players
end

function minetest.log(type, msg)
end

function minetest.register_on_chat_message(fun)
end

function minetest.register_chatcommand(cmd, def)
end

function minetest.setting_get_pos(setting)
    if mtmock.settings[setting] then
        return mtmock.settings[setting]
    else
        return nil
    end
end

return mtmock
